//
// Created by 罗俊华 on 2022/1/21.
//


#ifndef CPP_LEARNING_MY_QUEUE_H
#define CPP_LEARNING_MY_QUEUE_H
#include "my_node.h"
#include "item_define.h"



class Queue {

private:
    const static int DEFAULT_QUEUE_SIZE = 10;
    Node * first;
    Node * last;
    const int queue_size;
    int count;
    //    将赋值运算符重载私有化，禁止赋值
    Queue & operator=(const Queue & old);
    //    将拷贝构造函数私有化，禁止拷贝
    Queue(const Queue & old);
public:


    Queue(int size = DEFAULT_QUEUE_SIZE);

    ~Queue();

    bool isEmpty() const;

    bool isFull() const;

    int queueCount() const;

    /**
     * 入队
     * */
    bool enqueue(const Item &item);

    /**
     * 出队
     * */
    Item dequeue();
};


#endif //CPP_LEARNING_MY_QUEUE_H
